#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
const int maxn = 1e5+10;
const int mod = 1e9+7;
const int INF = 0x3f3f3f3f;
int d[4][2]={1,0,0,1,-1,0,0,-1};
int n;
ll a,b,c;
string s[maxn];
int main() {
    ios::sync_with_stdio(0);
    #ifdef Uncle_drew
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #else
    #endif
    string ans;
    cin>>n>>a>>b>>c;
    for(int i=0;i<n;i++) cin>>s[i];
    for(int i=0;i<n;i++){
       if (s[i] == "AB") {
            if (a + b == 0) {
                puts("No"); return 0;
            }
            if (a > b) { ans += "B\n"; a--; b++; }
            else if (a < b) { ans += "A\n"; a++; b--; }
            else if (s[i + 1] == "BC") { ans += "B\n"; a--; b++; }
            else { ans += "A\n"; a++; b--; }
        }
        else if (s[i] == "AC") {
            if (a + c == 0) {
                puts("No"); return 0;
            }
            if (a > c) { ans += "C\n"; a--; c++; }
            else if (a < c) { ans += "A\n"; a++; c--; }
            else if (s[i + 1] == "BC") { ans += "C\n"; a--; c++; }
            else { ans += "A\n"; a++; c--; }
        }
        else  {
            if (b + c == 0) {
                puts("No"); return 0;
            }
            if (b > c) { ans += "C\n"; b--; c++; }
            else if (b < c) { ans += "B\n"; b++; c--; }
            else if (s[i + 1] == "AC") { ans += "C\n"; b--; c++; }
            else { ans += "B\n"; b++; c--; }
        }

    }
    cout<<"Yes\n"<<ans<<endl;
    return 0;
}